<?php

class index extends base {
    
    private $content;
    
    public function submenu() {
        $this->submenu=array();
        $this->submenu[0]["name"]="Overview";
        $this->submenu[0]["callback"]="overview";
        $this->submenu[0]["icon"]="icons/cross.png";
        $this->submenu[0]["rights"]=0;
        $this->submenu[0]["enabled"]=true;
        $this->submenu[1]["name"]="Overview1";
        $this->submenu[1]["callback"]="overview1";
        $this->submenu[0]["rights"]=0;
        $this->submenu[1]["enabled"]=true;
        $this->_submenu($this->submenu);
    }

    public function run() {
        $this->submenu();
        $callback=$this->_run();
        if ($callback)
            $this->content=$this->$callback();
        $this->finish($this->content);
    }

    public function overview() {
        $this->page_manager->text_title("Test!");
        $this->page_manager->sticker("SNMP",STICKER_INACTIVE);
        $header=array(
        array("title"=>"Title1","color"=>"red"),
        array("title"=>"Title2","color"=>"green"),
        );
        $data=array(
        array("1","x","y"),
        array("2","q","w"),
        array("3","t","y"),
        array("4","h","g"),
        );
        $button=array("Insert","Change","Delete");
        $this->page_manager->style_table($header,$data,true,$button,5,"overview");
        $this->page_manager->block_message("mmmmm");
        $this->page_manager->start_form("form 1");
        $this->page_manager->form_add_field("field name","example field","text","default");
        $this->page_manager->form_add_element("<br /><br />\n");
        $this->page_manager->form_add_button("Submit me");
        $this->page_manager->end_form();
        return $this->page_manager->web_content;
    }

    public function overview1() {
        return "bbbb";
    }

}

?>